<div class="modal-header">
    <h3 class="modal-title">添加思路</h3>
    <input type="radio" name="aim" id="aim1" ng-click="aim1()" checked>
    <label for="aim1">针对计划:</label>
        <select>
            <option>计划1</option>
            <option>计划2</option>
            <option>计划3</option>
            <option>计划4</option>
        </select>
    <input type="radio" name="aim" id="aim2" ng-click="aim2()"><label for="aim2">针对宝贝</label>
</div>
<div class="modal-body" ng-hide="aim">
    <form class="form-inline" role="form">
        <label>思路编号:</label><input type="text" ng-model="semiauto.id">
        <label>思路名称:</label><input type="text" ng-model="semiauto.name">
        <div class="form-group">
            <label>参考</label>
            <select ng-model="semiauto.platform" class="form-horizontal">
                <option value="1">PC</option>
                <option value="2">移动</option>
                <option value="0">综合</option>
            </select>
            <select ng-model="semiauto.days" class="form-horizontal">
                <option value="1">昨天</option>
                <option value="3">最近三天</option>
                <option value="7">最近一周</option>
                <option value="15">最近半个月</option>
                <option value="30">最近一个月</option>
                <option value="90">最近三个月</option>
            </select>
            <label>的数据</label>
        </div>
        <div>
            <label>
                <h4>筛选出</h4>
            </label>
            <button class="btn btn-default pull-right editor-btn" ng-click="addCondition('and')">添加并条件</button>
            <button class="btn btn-default pull-right editor-btn" ng-click="addCondition('or')">添加或条件</button>
        </div>
        <div class="form-group">
            <div class="exo" ng-repeat="condition in semiauto.conditions">
                <select class="form-horizontal" ng-model="condition.name">
                    <option value="0">展现量</option>
                    <option value="1">点击量</option>
                    <option value="2">平均点击花费</option>
                    <option value="3">点击率</option>
                    <option value="4">点击转化率</option>
                    <option value="5">宝贝排名</option>
                    <option value="6">质量总分</option>
                    <option value="7">总花费</option>
                </select>
                <select class="form-horizontal" ng-model="condition.condition">
                    <option value="<">&lt;</option>
                    <option value=">">&gt;</option>
                    <option value="=">=</option>
                    <option value="<=">&lt;=</option>
                    <option value=">=">&gt;=</option>
                </select>
                <input type="text" ng-model="condition.value">
                <br>
                <label>的</label>
                <label class="radio-inline">
                    <input type="radio" ng-model="semiauto.condition.value[$index]" value="1">
                    宝贝均值
                </label>
                <label class="radio-inline">
                    <input type="radio" ng-model="semiauto.condition.value[$index]"  value="2">
                    最大值
                </label>
                <label class="radio-inline">
                    <input type="radio" ng-model="semiauto.condition.value[$index]"  value="3">
                    行业均值
                </label>
                <label class="radio-inline">
                    <input type="radio" ng-model="semiauto.condition.value[$index]"  value="4">
                    自定义<input type="text" ng-model="conditon.source_value">
                </label>
            </div>
            <h4>对符合条件的关键词做以下处理:</h4>
            <div class="exo">
                <ul class="list-unstyled">
                    <li>1.调价<input type="radio" name="radios1" ng-model="pricing" value="true"></li>
                    <li>
                        <label>选择匹配模式:</label>
                        <input type="radio" ng-model="semiauto.match_model.value" name="radios2"
                               value="0"><label>广泛匹配</label>
                        <input type="radio" ng-model="semiauto.match_model.value" name="radios2"
                               value="1"><label>精确匹配</label>
                    </li>
                    <li>
                        <label>选择调价模式:</label>
                        <select ng-model="semiauto.price_model.price_type" class="form-horizontal">
                            <option value="1">按百分比</option>
                            <option value="2">原基础上</option>
                        </select>
                        <select ng-model="semiauto.price_model.option_type" class="form-horizontal">
                            <option value="1">降价</option>
                            <option value="2">提价</option>
                        </select>
                        <input ng-model="semiauto.price_model.price_value" type="text">
                        <label>%</label>
                    </li>
                    <li>
                        <label>最高不得多于</label>
                        <input ng-model="semiauto.price_model.extreme" type="text">
                        <label>元</label>
                    </li>
                    <li>
                        <label>2.删除<input type="radio" name="radios1" ng-model="pricing"></label>
                    </li>
                </ul>
            </div>
            <div>
                <input type="checkbox" value="">
                <label>每天定时优化一次</label>
                <select class="form-horizontal">
                    <option>00:00</option>
                    <option>01:00</option>
                    <option>02:00</option>
                    <option>03:00</option>
                </select>
            </div>
        </div>
    </form>
</div>
<div ng-show="aim">
    <h4>选择要优化的推广组</h4>
    <table class="table table-responsive">
        <thead>
        <tr>
            <th><input type="checkbox" ng-model="num"></th>
            <th class="col-sm-4">宝贝名称</th>
            <th>宝贝售价</th>
            <th>类目:全部</th>
            <th>上架时间:从新到旧</th>
            <th>销量:从高到低</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="plan in semiauto.plans">
            <td><input type="checkbox" ng-model="plan.num[$index]" ng-checked="num"></td>
            <td>{{plan.name}}</td>
            <td>{{plan.price}}</td>
            <td>{{plan.type}}</td>
            <td>{{plan.time}}</td>
            <td>{{plan.sales}}</td>
        </tr>
        </tbody>
    </table>
    <button class="btn btn-default" ng-click="handle_plan()">确认</button>
    <button class="btn btn-default">取消</button>
</div>
<div class="modal-footer">
    <button class="btn btn-primary" type="button" ng-click="ok()">下一步</button>
    <button class="btn btn-warning" type="button" ng-click="cancel()">取消</button>
</div>

